<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8" />
        <title>添加司机</title>
        <link rel="stylesheet" href="/Public/Leader/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="/Public/Leader/css/index.css" />
        <style type="text/css">
            .order-list a {
                position: relative;
            }
            .order-list span {
                float: right;
                margin-right: 20px;
            }
            .pagination ul {
                display: inline-block;
                margin-left: 0;
                margin-bottom: 0;
                -webkit-border-radius: 3px;
                -moz-border-radius: 3px;
                border-radius: 3px;
                -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
                -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
                box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            }
            .pagination ul > li {
                display: inline;
            }
            .pagination ul > li > a, .pagination ul > li > span {
                float: left;
                padding: 0 14px;
                line-height: 38px;
                text-decoration: none;
                background-color: #ffffff;
                border: 1px solid #dddddd;
                border-left-width: 0;
            }
        </style>
    </head>
    <body>
        <style>
    .pagination .current{
        float: left;
    padding: 0 14px;
    line-height: 38px;
    text-decoration: none; 
    border-left-width: 0;
    }
        
</style>
<div id="topbar" class="top-navigation dark-bg ">
            <nav class="navbar   dark-bg " role="navigation" style="width:85%;margin:auto;">
                <div class="navbar-header" style="width:200px;">
                    <button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
                        <i class="fa fa-reorder"></i>
                    </button>
                    <a class="navbar-brand" href="<?php echo U('Index/index');?>">小易出行</a>
                </div>
                <div class="navbar-collapse collapse" id="navbar">
                    <ul class="nav navbar-nav dark-bg">
                        

                        <li <?php if($table == 'index'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Index/index');?>"> 首页</a>
                        </li>

                        <li <?php if($table == 'order'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Order/orderadmin');?>">订单管理</a>
                        </li>

                        <li <?php if($table == 'pay'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Pay/paycount');?>">交易中心</a>
                        </li>
                        <li <?php if($table == 'article'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Article/lst');?>">文章</a>
                        </li>
                        <li <?php if($table == 'wx'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Wx/wx_menu/wid/1');?>">微信管理</a>
                        </li>
                        <li <?php if($table == 'line'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Line/lineadmin');?>">线路管理</a>
                        </li>
                        <li <?php if($table == 'user'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('User/userinfo');?>">用户管理</a>
                        </li>
                        <li <?php if($table == 'useradmin'): ?>class="active"<?php endif; ?>>
                            <a href="<?php echo U('Useradmin/userinfo');?>">系统管理</a>
                        </li>

                    </ul>
                    <ul class="nav navbar-top-links navbar-right">
                        <li class="dropdown">
                            <a aria-expanded="false" role="button" href="#" class="dropdown-toggle" data-toggle="dropdown" style="position:relative;" onclick="$(this).find('span').toggleClass('deg180')">
                                <name style="width: 80px;white-space:nowrap;overflow:hidden;text-overflow: ellipsis;display: block;text-align: center"><?php echo session('username');?></name>
                                <span class="caret" style="position: absolute;top: 22px;right: 12px;"></span></a>
                            <ul role="menu" class="dropdown-menu">
                                <li>
                                    <a onclick="return confirm('您确定要退出吗？')" tabindex="-1" href="<?php echo U('Login/Logout');?>">退出</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>
        <div class="wrapper main-wrapper wrapper-content ">
            <div class="page-menubar">
                <!--<div class="menu-header">系统管理</div>-->
                <ul class="order-list">
                    <li class="active">
                        <a href="<?php echo U('Useradmin/userinfo');?>"><img src="/Public/images/ic-19.png" alt="" class="com-icon">系统管理员</a>
                    </li>
                    <li>
                        <a href="<?php echo U('Useradmin/adduser');?>"><img src="/Public/images/ic-20.png" alt="" class="com-icon">添加用户</a>
                    </li>
                    <li>
                        <a href="<?php echo U('pay/paysetting');?>"><img src="/Public/images/ic-21.png" alt="" class="com-icon">系统设定</a>
                    </li>
                </ul>
            </div>
            <!--主要内容-->
            <div class="page-content" style="display: block;">
                <!--内容标题-->
                <div class="page-heading" style="position:relative;">
                    <h2>修改管理员信息</h2>
                </div>
                <div class="panel panel-default" style="margin-top: 20px;">
                    <div class="panel-body">
                        <div id="myTabContent" class="tab-content">
                            <div class="tab-pane active in" id="home">
                                <form role="form" id="tab">
                                    <div class="form-group">
                                      <label for="name">用户名：</label>
                                      <input type="hidden" value="<?php echo ($us["id"]); ?>" name="id" class="input-xlarge">
                                      <input type="text" class="form-control" value="<?php echo ($us["username"]); ?>" name="username" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                      <label for="name">密码：</label>
                                      <input type="password" class="form-control" name="password" style="width:40%;">
                                    </div>
                                    <div class="form-group">
                                        <label for="name">退款权限：</label>
                                        <select name="tk_qx">
                                            <option value="<?php echo ($us["tk_qx"]); ?>">
                                                <?php switch($us["tk_qx"]): case "0": ?>无<?php break;?>
                                                    <?php case "1": ?>有<?php break; endswitch;?>
                                               </option>
                                            <option value="0">无</option>
                                            <option value="1">有</option>
                                        </select>
                                    </div>
                                    <div class="form-group">
                                      <button  type="button" class="btn btn-primary" onclick="tj()">修改</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <script src="/Public/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Public/Leader/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    function tj() {

        $.ajax({
            type: "POST",
            url: "/admin.php/useradmin/Userxg",

            cache: false,
            data: $('#tab').serialize(),

            success: function (data) {
                data = $.trim(data);
                switch (data) {

                    case '0':
                        alert('修改成功');
                        window.location.replace("/admin.php/useradmin/Userinfo")
                        break;
                    case '1':
                        alert('修改失败');

                        break;
                    case '3':
                        alert('用户编号已存在');

                        break;

                    default:
                        alert(data);
                }

            }




        })


    }
</script>

<script type="text/javascript">
   $("[rel=tooltip]").tooltip();
   $(function () {
       $('.demo-cancel-click').click(function () {
           return false;
       });
   });
</script>
</html>